﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContentView.aspx.cs" Inherits="ContentView" MasterPageFile="~/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<center>
    <script type="text/javascript">
        function write_ok() {
            var content = document.getElementById("<%= tbComment.ClientID %>").value;
            Check1(content);
        }
        function DateOK() {
            <%=Page.ClientScript.GetPostBackEventReference(WriteOK,"") %>
        }
        
        //삭제 버튼을 클릭함
        function content_Modify(no)
        {
            document.getElementById("<%= no.ClientID %>").value = no;
            document.getElementById("<%= modify_table.ClientID %>").style.display = "block";
        }
        function cancel()
        {
            document.getElementById("<%= modify_table.ClientID %>").style.display="none";
            document.getElementById("<%= Comment.ClientID %>").value="";
        }
        

    </script>

    <div style="margin-top: 30px; margin-bottom: 20px;">
        <div style="float: left; width: 300px; text-align: left; padding-left: 40px; font-size: 14px;
            font-family: 돋움; color: #a8a8a8; font-weight: bold;">
            <asp:Label ID="lblTitle" runat="server" Text="title"></asp:Label></div>
        <div style="float: right; width: 250px; margin-top: 3px;">
            <span style="color: #878787; font-family: 돋움; font-size: 11px;">작성자</span>&nbsp;<span
                style="font-size: 11px; font-weight: bold; font-family: 돋움; color: White;"><asp:Label
                    ID="lblName" runat="server" Text="Label"></asp:Label></span>&nbsp;&nbsp;&nbsp;<span
                        style="color: #878787; font-family: 돋움; font-size: 11px;">|</span>&nbsp;&nbsp;&nbsp;<span
                            style="font-size: 11px; font-weight: bold; font-family: 돋움; color: White;">Hit</span>&nbsp;<span
                                style="color: Yellow; font-size: 11px; font-family: Arial; font-weight: bold;"><asp:Label
                                    ID="lblHit" runat="server"></asp:Label></span></div>
    </div>
    <div style="margin-bottom: 20px; margin-top: 20px; width: 800px; max-width: 800px;">
        <asp:FormView ID="DeepZoomView" runat="server" AllowPaging="false">
    
        <ItemTemplate>
            <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="630" height="473" id="Xaml">  
             <%--<param name="source" value="http://hugeflow.com/Sample/DeepView/DeepView.xap"/>   --%>
             <param name="source" value="http://211.189.20.163/SmartMosaicServer/UploadData/DeepView.xap"/>
             
             <param name="onerror" value="onSilverlightError" />   
             <param name="background" value="white" />
             <param name="EnableHtmlAccess" value="true"/>
             <param name="initParams" value="DZSource=<%# Eval("DeepZoomUrl")%>/dzc_output.xml,Title=NamDaeMoon%2c+Seoul%2c+South+Korea,Author=yunphoto.net,InitViewportWidth=1,InitViewportOriginX=0,InitViewportOriginY=0" />
             <%--<param name="initParams" value="DZSource=http://211.189.20.163/SmartMosaicServer/UploadData/0/dzc_output.xml" />   --%>
             <a href="http://go.microsoft.com/fwlink/?LinkID=108182" style="text-decoration: none;">        
             <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>   
             </a>  
            </object>
        </ItemTemplate>    
        
    </asp:FormView>
        </div>
    <div style="width: 840px; border-style: solid; border-color: #878787; border-width: 1px;
        padding: 20px 25px 20px 25px;">
        <div style="font-family: Arial; font-size: 11px; font-weight: bold; color: White;
            text-align: left;">
            DESCRIPTION</div>
        <div style="font-family: 돋움; font-size: 11px; color: #afafaf; text-align: left; margin-top: 10px;">
            <asp:Label ID="lblContent" runat="server" Text="Label"></asp:Label>
        </div>
        <div style="font-family: Arial; font-size: 11px; font-weight: bold; color: #afafaf;
            text-align: right;">
            <asp:Label ID="lblDate_time" runat="server" Text="Label"></asp:Label></div>
    </div>
    <div>
        <asp:Label ID="lblError" runat="server" ForeColor="White"></asp:Label></div>
    <div style="width: 880px; text-align: right; margin-top: 10px; margin-bottom: 10px;">
        <table>
            <tr>
                <td>
                    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/img/btn_recom.gif"
                        OnClick="btn_recom_Click" />
                </td>
                <td>
                    <asp:ImageButton ID="ibEdit" runat="server" ImageUrl="~/img/photo_modify.gif"
                        OnClick="ibEdit_Click" />
                </td>
                <td>
                    <asp:ImageButton ID="ibDelete" runat="server" ImageUrl="~/img/photo_del.gif" OnClientClick="return confirm('삭제하시겠습니까');"
                        OnClick="ibDelete_Click" />
                </td>
                <td>
                    <asp:ImageButton ID="ibList" runat="server" ImageUrl="~/img/photo_list.gif" PostBackUrl="~/ContentList.aspx" />
                </td>
            </tr>
        </table>
    </div>
    <div style="width: 880px">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:LinkButton ID="WriteOK" runat="server" OnClick="WriteOK_Click"></asp:LinkButton>
                <asp:HiddenField ID="no" runat="server" />
                <asp:Panel ID="Panel1" runat="server">
                    <table>
                        <tr>
                            <td style="width: 100px; font-size: 12px; font-family: 돋움; color: White">
                                <asp:Label ID="lblUserName" runat="server" Text="Label"></asp:Label>
                            </td>
                            <td style="width: 660px">
                                <asp:TextBox ID="tbComment" runat="server" Width="660px"></asp:TextBox>
                            </td>
                            <td style="width: 100px">
                                <img alt="" src="img/write_re.gif" style="cursor: pointer" onclick="write_ok()" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel runat="server" ID="pnl_replylist">
                    <asp:DataList ID="DataList1" runat="server" OnItemDataBound="DataList_databound">
                        <HeaderTemplate>
                            <table width="880px" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td colspan="4" style="height: 1px; background-color: #878787;">
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="height: 25px;">
                                    <table style="height: 22px;" width="100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="width: 80px; font-size: 13px; font-family: 돋움; color: white;">
                                                <%#Eval("name").ToString() %>
                                            </td>
                                            <td style="width: 550px; font-size: 13px; font-family: 돋움; color: #afafaf;">
                                                <span id="span_content" runat="server"></span>
                                            </td>
                                            <td style="width: 150px; font-size: 13px; font-family: 돋움; color: white;">
                                                <%#Eval("regdate").ToString() %>
                                            </td>
                                            <td style="width: 100px; font-size: 13px; font-family: 돋움; color: #526569;">
                                                <img id="Imgbtn_Modify" onclick="content_Modify('<%#Eval("no")%>')" src="img/photo_modify.gif"
                                                    alt="" style="cursor: pointer" />
                                                <img id="Imgbtn_Delete" onclick="content_Delete('<%#Eval("no")%>')" src="img/photo_del.gif"
                                                    alt="" style="cursor: pointer" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr>
                                <td colspan="4" style="height: 1px; background-color: #878787;">
                                </td>
                            </tr>
                            </table></FooterTemplate>
                    </asp:DataList>
                </asp:Panel>
                <asp:Panel ID="pnl_modify" runat="server" Style="position: absolute; top: 300px;
                    left: 500px">
                    <table id="modify_table" style="display: none; background-color: #959695" cellspacing="0"
                        cellpadding="0" width="660" border="0" runat="server">
                        <tbody>
                            <tr style="height: 30px" valign="middle">
                                <td colspan="2">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 560px">
                                    <asp:TextBox ID="Comment" runat="server"></asp:TextBox>
                                </td>
                                <td style="width: 100px">
                                    <asp:Button ID="btn_Mod" runat="server" Text="수정" OnClick="content_Modify" />
                                    <input id="btn_cancel" type="button" value="취소" onclick="cancel()" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </asp:Panel>
                <act:DragPanelExtender ID="dragpanel1" runat="server" DragHandleID="pnl_modify" TargetControlID="pnl_modify">
                </act:DragPanelExtender>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:HiddenField ID="HiddenOrder" runat="server" />
    </div>
    </center>
</asp:Content>
